package net.valerijtimakov.homefinances.dao.storages.finances.mysql;

import java.sql.ResultSet;

import net.valerijtimakov.homefinances.exceptions.AppPersProviderException;

public interface IMySqlProvider {
	public static final long UNDEFINED_LAST_INSERT_ID = -1;
	
	ResultSet getResultSet();
	int query(String sql) throws AppPersProviderException;
	long insert(String sql) throws AppPersProviderException;
	int update(String sql) throws AppPersProviderException;
	void exec(String sql) throws AppPersProviderException;
	void close();
	boolean next() throws AppPersProviderException;
	void beginTransaction() throws AppPersProviderException;
	void commit() throws AppPersProviderException;
	void rollback() throws AppPersProviderException;
}
